cmake_minimum_required(VERSION 3.15 FATAL_ERROR)

project(rtsp_client_test LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

#include(GNUInstallDirs)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})

if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type" FORCE)
endif()

message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")

add_subdirectory(sdp-cpp)

add_library(rtsp_client STATIC RtspClient.h RtspClient.cpp RtspMethod.h RtspMethod.cpp)
target_include_directories(rtsp_client
    PUBLIC
    external/asio
    sdp-cpp/include
    )

target_link_libraries(rtsp_client
    PUBLIC
    sdp-cpp
    pthread
    )

add_executable(rtsp_client_test main.cpp)

target_link_libraries(rtsp_client_test
    PUBLIC
    rtsp_client
    pthread
    )


